<div class="main">
  <div class="main-header">
    <div class="pa-icon-div pull-left fs-14">
      <i class="iconfont icon-shouye fs-14 icon-vertical-top"></i>
      <span class="fs-vertical-middle">内业>
      <span class="fs-theme-color">实况列表</span>
      </span>
    </div>
    <go-back></go-back>
  </div>
  <div class="main-content">
    <div class="search-info">
      <div class="container-header fs-16">
        <span>工程实况列表</span>
      </div>
      <form class="base-info">
        <div class="base-info-item">
          <div class="pa-form-control">
            <label>提交时间：</label>
            <input type="text" class="pa-form-control-input date-picker"
              data-ng-datepicker
              ng-model="vm.mapParams.start">
            <label class="pa-form-zhi">至</label>
            <input type="text" class="pa-form-control-input date-picker"
              data-ng-datepicker
              ng-model="vm.mapParams.end">
          </div>
          <div class="pa-form-control pa-form-control-btn fr">
            <button class="pa-btn pa-sw-btn" type="button"
              ng-click="vm.$paginationQuery()">搜索</button>
            <button class="pa-btn pa-sw-btn reset-btn" type="reset"
              ng-click="vm.$reset()">重置</button>
          </div>
        </div>
      </form>
    </div>
    <div class="pa-fl">
      <div class="pa-operate-fr fs-theme-color"
        ng-click="vm.$addActualSituation(vm)">
        <i class="iconfont icon-add icon-middle fs-12"></i>
        <span>新增</span>
      </div>
    </div>
    <pa-table>
      <table class="pa-table">
        <thead>
          <tr>
            <th class="sorting"
              ng-class="{'sorting-desc': vm.mapParams.sortType == 2, 'sorting-asc': vm.mapParams.sortType == 1}"
              ng-click="vm.$toggleOrder('created_time')">
              提交时间
            </th>
            <th>提交人</th>
            <th>内容</th>
            <th class="operate-three">操作</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="item in vm.actuaSituationData">
            <td>{{item.createdTime | date:"yyyy-MM-dd"}}</td>
            <td>{{item.submitter}}</td>
            <td><div class="overflow-txt">{{item.progressSituation}}</div></td>
            <td>
              <div class="operate-del" ng-click="vm.$viewDatail(item.id, vm)">
                <i class="iconfont icon-jilu3 detail-color fs-12"></i>
                <span>详情</span>
              </div>
              <div class="operate-del" ng-click="vm.$delete(item.id)">
                <i class="iconfont icon-shanchu trash-color fs-12"></i>
                <span>删除</span>
              </div>
            </td>
          </tr>
        </tbody>
      </table>
    </pa-table>
  </div>
</div>

<!-- 新增实况 -->
<script type="text/ng-template" id="addActualSituationDialog">
  <div class="pa-dialog pa-dialog-actual">
    <div class="pa-dialog-header">
      <div class="title-txt">
        <span>新增工程实况</span>
      </div>
    </div>
    <div class="pa-dialog-content text-center">
      <div class="pa-form-control pa-width-100">
        <label class="text-right actual-label">内容：</label>
        <textarea class="pa-form-control-input actual-textarea"
          ng-model="vm.params.progressSituation"></textarea>
      </div>
    </div>
    <div class="pa-dialog-footer text-center">
      <a class="pa-btn" ng-click="vm.sureBtnFn()">
        <span>确定</span>
      </a>
      <a class="pa-btn reset-btn" ng-click="closeThisDialog()">
        <span>取消</span>
      </a>
    </div>
  </div>
</script>

<!-- 实况 详情-->
<script type="text/ng-template" id="actualSituationDetailDialog">
  <div class="pa-dialog pa-dialog-actual">
    <div class="pa-dialog-header">
      <div class="title-txt">
        <span>工程实况详情</span>
      </div>
    </div>
    <div class="pa-dialog-content">
      <div class="pa-form-control pa-width-100">
        <label class="text-right actual-label">内容详情：</label>
        <span class="pa-form-control-span"
          style="width: 264px;">{{vm.view.progressSituation}}</span>
      </div>
      <div class="pa-form-control pa-width-100">
        <label class="text-right actual-label">提交人：</label>
        <span class="pa-form-control-span"
          style="width: 264px;">{{vm.view.submitter}}</span>
      </div>
      <div class="pa-form-control pa-width-100">
        <label class="text-right actual-label">提交时间：</label>
        <span class="pa-form-control-span"
          style="width: 264px;">{{vm.view.createdTime | date:"yyyy-MM-dd"}}</span>
      </div>
    </div>
  </div>
</script>